﻿using PARK.Common.Const;
using SqlSugar;
using System;

namespace PARK.Consumer.Entity
{
    /// <summary>
    /// 充值管理
    /// </summary>
    [SugarTable("consum_recharge")]
    [Tenant(ClaimConst.TENANT_ID)]
    public class ConsumRechargeEntity
    {
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
        public string Id { get; set; }
        
        /// <summary>
        /// 单据编号
        /// </summary>
        [SugarColumn(ColumnName = "BillCode")]        
        public string BillCode { get; set; }
        
        /// <summary>
        /// 单据日期
        /// </summary>
        [SugarColumn(ColumnName = "BillDate")]        
        public DateTime? BillDate { get; set; }

        /// <summary>
        /// 充值前余额
        /// </summary>
        [SugarColumn(ColumnName = "BeforeRecharg")]
        public decimal BeforeRecharg { get; set; }
        /// <summary>
        /// 充值金额
        /// </summary>
        [SugarColumn(ColumnName = "RechargeAmt")]        
        public decimal RechargeAmt { get; set; }
        /// <summary>
        /// 充值后余额
        /// </summary>
        [SugarColumn(ColumnName = "AfterRecharg")]
        public decimal AfterRecharg { get; set; }


        /// <summary>
        /// 1 增值 -1减值（线下）
        /// </summary>
        [SugarColumn(ColumnName = "IsImpairment")]        
        public int IsImpairment { get; set; }

        /// <summary>
        /// 充值方式 1线上  2线下
        /// </summary>
        [SugarColumn(ColumnName = "Paytype")]
        public int  Paytype { get; set; } = 2;

        /// <summary>
        /// 是否支付 1是0否
        /// </summary>
        [SugarColumn(ColumnName = "IsPay")]
        public int IsPay { get; set; } = 0;
        
        /// <summary>
        /// 支付时间
        /// </summary>
        [SugarColumn(ColumnName = "PayDate")]        
        public DateTime? PayDate { get; set; }
        
        /// <summary>
        /// 微信支付单号
        /// </summary>
        [SugarColumn(ColumnName = "ApiPayId")]        
        public string ApiPayId { get; set; }
        
        /// <summary>
        /// 支付结果  0未支付 1支付成功  -1支付失败 2：转入退款  3：已关闭  4：已撤销  5：支付中 
        /// </summary>
        [SugarColumn(ColumnName = "PayResult")]        
        public int? PayResult { get; set; }
        
        /// <summary>
        /// 支付返回
        /// </summary>
        [SugarColumn(ColumnName = "PayResultMsg")]        
        public string PayResultMsg { get; set; }
        
        /// <summary>
        /// 摘要信息
        /// </summary>
        [SugarColumn(ColumnName = "Summary")]        
        public string Summary { get; set; }
        
        /// <summary>
        /// 创建人Id
        /// </summary>
        [SugarColumn(ColumnName = "CreateUser")]        
        public string CreateUser { get; set; }
        
        /// <summary>
        /// 创建人姓名
        /// </summary>
        [SugarColumn(ColumnName = "CreateUserName")]        
        public string CreateUserName { get; set; }
        
        /// <summary>
        /// 创建日期
        /// </summary>
        [SugarColumn(ColumnName = "CreateDate")]        
        public DateTime? CreateDate { get; set; }       
        
        /// <summary>
        /// 入库时间
        /// </summary>
        [SugarColumn(ColumnName = "DbDate")]        
        public DateTime? DbDate { get; set; }
        
        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnName = "Acctimestamp")]        
        public string Acctimestamp { get; set; }

        /// <summary>
        /// 消费卡号 
        /// </summary>
        [SugarColumn(ColumnName = "CardNo")]
        public string CardNo { get; set; }
        /// <summary>
        /// 卡面卡号 
        /// </summary>
        [SugarColumn(ColumnName = "CatCardNo")]
        public string CatCardNo { get; set; }        
        /// <summary>
        /// 用户Id
        /// </summary>
        [SugarColumn(ColumnName = "EmployeeId")]
        public string EmployeeId { get; set; }

        /// <summary>
        /// 工号
        /// </summary>
        [SugarColumn(ColumnName = "JobNo")]
        public string JobNo { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        [SugarColumn(ColumnName = "ReallName")]
        public string ReallName { get; set; }

        /// <summary>
        /// 部门Id
        /// </summary> 
        [SugarColumn(ColumnName = "DepartId")]       
        public string DepartId { get; set; }

        /// <summary>
        /// 部门
        /// </summary>
        [SugarColumn(ColumnName = "DepartName")]        
        public string DepartName { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        [SugarColumn(ColumnName = "MobilePhone")]
        public string MobilePhone { get; set; }

        /// <summary>
        /// 所属公司Id
        /// </summary>
        [SugarColumn(ColumnName = "CompanyId")]
        public string CompanyId { get; set; }

        /// <summary>
        /// 公司名称
        /// </summary>
        [SugarColumn(ColumnName = "CompanyName")]
        public string CompanyName { get; set; }

        #region 代充值
        /// <summary>
        /// 是否代充订单 0否1是
        /// </summary>
        [SugarColumn(ColumnName = "IsTake")]
        public int IsTake { get; set; }
        /// <summary>
        /// 代充人员Id
        /// </summary>
        [SugarColumn(ColumnName = "TakeEyeId")]
        public string TakeEyeId { get; set; }
        #endregion
    }
}